/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cqcis.uip.base.framework.core;

import java.util.Collection;

import com.cqcis.uip.base.framework.common.Task;

/**
 * task等待时间控制池
 * 
 * @author huangmy
 * @date   2008-5-9
 */
public interface TaskWaitTimeConsumePool {	
    /**
     * 将task投入等待池
     * 
     * @param task
     */
    public void putTaskWait(Task task);
    
    /**
     * 删除一个等待的task
     * 
     * @return
     */
    public Task removeTaskWait();
    
    /**
     * 所有的等待task
     * 
     * @return
     */
    public Collection<Task> getAllTaskWaits();
    
    /**
     * 删除指定的task
     * 
     * @param task
     * @return
     */
    public boolean removeTaskWait(Task task);
    
    /**
     * 删除指定的task, 且继续执行
     * 
     * @param task
     * @return
     */
    public boolean removeTaskWaitAndExecute(Task task);
}
